﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TQuestion_Add.aspx.cs" Inherits="ExamSystem.ht.TQuestion_Add" ValidateRequest="false" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>添加试题</title>
	<meta charset="utf-8"/>
	<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/lib/Hui-iconfont/1.0.8/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="../h-ui/static/h-ui.admin/css/style.css" />
	<script type="text/javascript" src="../h-ui/lib/jquery/1.9.1/jquery.min.js"></script> 
	<script type="text/javascript" src="../h-ui/lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="../h-ui/static/h-ui/js/H-ui.min.js"></script> 
	<script type="text/javascript" src="../h-ui/static/h-ui.admin/js/H-ui.admin.js"></script> 
	<script type="text/javascript">
	$(function(){
		$('.skin-minimal input').iCheck({
			checkboxClass: 'icheckbox-blue',
			radioClass: 'iradio-blue',
			increaseArea: '20%'
		});
	});
    //选择正确答案时，需要把答案赋给隐藏文本
	function checkOption() {
	    var answer = "";
	    var ops = document.getElementsByName("op");
	    for (var i = 0; i < ops.length; i++) {
	        if (ops[i].checked) {
	            answer += ops[i].value;
	        }
	    }
	    document.getElementById("tqAnswer").value = answer;
	}
	</script> 
</head>
<body >
    <nav class="breadcrumb">
		    <i class="Hui-iconfont">&#xe67f;</i> 
		    首页 <span class="c-gray en">&gt;</span> 
		    试题信息 <span class="c-gray en">&gt;</span> 
		    试题管理 <span class="c-gray en">&gt;</span> 
            试题新增
	</nav>
    <form id="form1" runat="server" class="form form-horizontal">
    <div style="text-align:left">
        <article class="page-container">
			    <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2"><span class="c-red">*</span>课程：</label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:20%"> <span class="select-box">
					    <select class="select" runat="server" id="tkcId">
						    <option value="" selected>请选择课程</option>
					    </select>
					    </span> 
				    </div>
			    </div>
                <div class="row cl">
				        <label class="form-label col-xs-1 col-sm-2"><span class="c-red">*</span>类型：</label>
				        <div class="formControls col-xs-8 col-sm-9 skin-minimal">
					        <div class="radio-box">
						        <input name="tqType" type="radio" id="type1" checked runat="server" value="单选"/>
						        <label for="type1">单选</label>
					        </div>
					        <div class="radio-box">
						        <input type="radio" id="type2" name="tqType" runat="server" value="多选"/>
						        <label for="type2">多选</label>
					        </div>
				        </div>
			    </div>
                <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2"><span class="c-red">*</span>分值：</label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:20%"> <span class="select-box">
					    <select class="select" runat="server" id="tqScore">
						    <option value="1">1</option>
						    <option value="2" selected>2</option>
						    <option value="3">3</option>
						    <option value="4">4</option>
						    <option value="5">5</option>
						    <option value="6">6</option>
						    <option value="7">7</option>
						    <option value="8">8</option>
						    <option value="9">9</option>
						    <option value="10">10</option>
					    </select>
					    </span> 
				    </div>
			    </div>
			    <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2"><span class="c-red">*</span>题目：</label>
				    <div class="formControls col-xs-8 col-sm-9">
				        <textarea runat="server" id="tqName" class="textarea" style="width:80%;height:200px"></textarea>
				    </div>
			    </div>
			    <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2">
                        <input type="checkbox" value="A" name="op" onclick="checkOption()"/>
                        <span class="c-red">*</span>选项A：
				    </label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:50%">
					    <input type="text" class="input-text"  id="tqA" runat="server"/>
				    </div>
			    </div>
			    <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2">
                        <input type="checkbox" value="B" name="op" onclick="checkOption()"/>
                        <span class="c-red">*</span>选项B：
				    </label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:50%">
					    <input type="text" class="input-text"  id="tqB" runat="server"/>
				    </div>
			    </div>
                <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2">
                        <input type="checkbox" value="C" name="op" onclick="checkOption()"/>
                        <span class="c-red">*</span>选项C：
				    </label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:50%">
					    <input type="text" class="input-text"  id="tqC" runat="server"/>
				    </div>
			    </div>
                <div class="row cl">
				    <label class="form-label col-xs-1 col-sm-2">
                        <input type="checkbox" value="D" name="op" onclick="checkOption()"/>
                        <span class="c-red">*</span>选项D：
				    </label>
				    <div class="formControls col-xs-8 col-sm-9" style="width:50%">
					    <input type="text" class="input-text"  id="tqD" runat="server"/>
				    </div>
			    </div>
			   <div  style="position:fixed;bottom:5px;right:10px;background-color:yellow;width:20%">
                    <input type="hidden" runat="server" id="tqAnswer" value=""/>
                    <label runat="server" id="lbMsg" style="color:red"></label><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;
                    <input class="btn btn-primary radius" style="background-color:dimgrey;margin-right:50px" type="button" value="  返  回  " onclick="history.go(-1)" />
                    <asp:Button ID="btnSave" runat="server" CssClass="btn btn-primary radius" Text="  保  存  " OnClick="btnSave_Click" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			   </div>
	    </article>
    </div>
    </form>
</body>
</html>
